package csw;

import java.util.Scanner;

public class ch2ex111_3 {

	public static void main(String[] args) {

		int price = 0;
		int money50000 = 50000;
		int money10000 = 10000;
		int money5000 = 5000;
		int money1000 = 1000;
		int money500 = 500;
		int money100 = 100;
		int money50 = 50;
		int money10 = 10;
		int b = 0;

		Scanner sc;
		sc = new Scanner(System.in);

		System.out.println("입력받는 돈");
		price = sc.nextInt();

		System.out.println("50000원");
		b = (price / money50000);
		System.out.println(b);
		price = price % money50000;

		System.out.println("10000원");
		b = (price / money10000);
		System.out.println(b);
		price = price % money10000;

		System.out.println("5000원");
		b = (price / money5000);
		System.out.println(b);
		price = price % money5000;

		System.out.println("1000원");
		b = (price / money1000);
		System.out.println(b);
		price = price % money1000;

		System.out.println("500원");
		b = (price / money500);
		System.out.println(b);
		price = price % money500;

		System.out.println("100원");
		b = (price / money100);
		System.out.println(b);
		price = price % money100;

		System.out.println("50원");
		b = (price / money50);
		System.out.println(b);
		price = price % money50;

		System.out.println("10원");
		b = (price / money10);
		System.out.println(b);
		price = price % money10000;

		sc.close();

	}

}
